import hyRequest from '..'
import type { IAccount } from '@/types'

export function accountLoginRequest(account: IAccount) {
  return hyRequest.post({
    url: '/users/login',
    data: account,
  })
}

export function getUserInfoByid(id: number) {
  return hyRequest.get({
    url: '/users/' + id,
  })
}

export function getUserMenusByRoleId(id: number) {
  return hyRequest.get({
    url: `/role/${id}/menu`,
  })
}
